export const request = (uri,method="GET",data,header={})=>{
  const baseUrl = "http://localhost:8888/v1"
  const url = baseUrl + uri
  //发送请求自动携带token
  header.openId = wx.getStorageSync('token')
  return new Promise((resolve,reject)=>{
    wx.request({
      url,
      method,
      data,
      header,
      success(res){
        resolve(res.data)
      },
      fail(err){
        reject(err)
      }
    })
  })
}